package router

import (
	"github.com/gin-gonic/gin"
	swaggerfiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
	_ "learn/docs"
)

// Swagger 配置

func Router() *gin.Engine {
	router := gin.Default()
	// swagger 相关路由

	router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
	// 用户相关路由
	userRouter(router)
	// 公告路由
	commmonRouter(router)

	return router
}
